package com.ruoyi.core.service.impl;

import java.util.List;

import com.ruoyi.common.entity.CoreEntity.LotteryConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.core.mapper.LotteryConfigMapper;

import com.ruoyi.core.service.ILotteryConfigService;

/**
 * 积分抽奖奖品配置Service业务层处理
 * 
 * @author Sxz
 * @date 2025-08-07
 */
@Service
public class LotteryConfigServiceImpl implements ILotteryConfigService 
{
    @Autowired
    private LotteryConfigMapper lotteryConfigMapper;

    /**
     * 查询积分抽奖奖品配置
     * 
     * @param id 积分抽奖奖品配置主键
     * @return 积分抽奖奖品配置
     */
    @Override
    public LotteryConfig selectLotteryConfigById(Long id)
    {
        return lotteryConfigMapper.selectLotteryConfigById(id);
    }

    /**
     * 查询积分抽奖奖品配置列表
     * 
     * @param lotteryConfig 积分抽奖奖品配置
     * @return 积分抽奖奖品配置
     */
    @Override
    public List<LotteryConfig> selectLotteryConfigList(LotteryConfig lotteryConfig)
    {
        return lotteryConfigMapper.selectLotteryConfigList(lotteryConfig);
    }

    /**
     * 新增积分抽奖奖品配置
     * 
     * @param lotteryConfig 积分抽奖奖品配置
     * @return 结果
     */
    @Override
    public int insertLotteryConfig(LotteryConfig lotteryConfig)
    {
        return lotteryConfigMapper.insertLotteryConfig(lotteryConfig);
    }

    /**
     * 修改积分抽奖奖品配置
     * 
     * @param lotteryConfig 积分抽奖奖品配置
     * @return 结果
     */
    @Override
    public int updateLotteryConfig(LotteryConfig lotteryConfig)
    {
        return lotteryConfigMapper.updateLotteryConfig(lotteryConfig);
    }

    /**
     * 批量删除积分抽奖奖品配置
     * 
     * @param ids 需要删除的积分抽奖奖品配置主键
     * @return 结果
     */
    @Override
    public int deleteLotteryConfigByIds(Long[] ids)
    {
        return lotteryConfigMapper.deleteLotteryConfigByIds(ids);
    }

    /**
     * 删除积分抽奖奖品配置信息
     * 
     * @param id 积分抽奖奖品配置主键
     * @return 结果
     */
    @Override
    public int deleteLotteryConfigById(Long id)
    {
        return lotteryConfigMapper.deleteLotteryConfigById(id);
    }
}
